Tight Integration of Java and Petri Nets
نویسنده
چکیده
Olaf Kummer Universität Hamburg, Fa hberei h Informatik Vogt-Kölln-Straÿe 30, D-22527 Hamburg kummer informatik.uni-hamburg.de Abstra t In this paper we investigate how the Java programming language an be integrated in an obje t-oriented Petri net formalism. It be omes apparent how a arefully designed uni ation algorithm supports this goal, despite the fa t that Java itself is not based on uni ation. Some dedi ated algorithms for a Petri net simulator are proposed. 1 Introdu tion The basi net formalism dis ussed in this paper are referen e nets. In referen e nets, a net an be instantiated arbitrarily often and referen es to net instan es an be used as tokens in other net instan es. For details see [6℄. Referen e nets use a variant of Java as their ins ription language. See [2℄ for the original Java spe i ation. This paper an be seen as a ompanion to the earlier work [4℄, where the referen e net formalism and the large s ale ar hite ture of the Petri net simulator Renew are des ribed. Here we will dis uss some further aspe ts that were only very brie y sket hed in [4℄. 2 Tuples The Java language has no support for tuples. The only ase where tuples would ome in handy in Java would be multi-value returns. However, these o ur not very often and an be substituted by the return of a omplex obje t that aggregates the return values. In other ases, when we have multiple values that should be pro essed together, we an simply use multiple variables that hold one value ea h. But for Petri nets, tuples are more important. It is dangerous to store related values in multiple pla es, be ause, if multiple tokens have to be put there, tokens for di erent data sets an be mixed. Tuples solve this problem. Java's syntax o ers two opportunities for adding tuples. Either a tuple is written (1,2,3) or [1,2,3℄. The rst form has the disadvantage that it is impossible to write 1-tuples, be ause they ould be mistaken for grouping operations, e.g. "string"+(true|false)would be ambiguous. Hen e it was de ided to use the square bra ket notation. However, when we want to support lists as well as tuples, we have to ll both synta ti ni hes. In that ase, 1-tuples might be onsidered dispensable, but lists of length 1 would be mandatory, so that the de ision would have been the other way round.
منابع مشابه
Producing Network Applications Using Object-Oriented Petri Nets
The programming language Java has become and extremely popular language; many people are writing concurrent systems using Java. The design and implementation of concurrent Java programs is significantly more complex than sequential programs and the use formal method is seen as extremely beneficial for the design and implementation of such systems. The Petri net formalism [Petri 1962] can be use...
متن کاملConcurrent Architecture for a Multi-agent Platform
A multi-agent system has a high degree of concurrency. Petri nets are a well-established means for the description of concurrent systems. Reference nets are higher level, object-oriented Petri nets. With Renew (REference NEt Workshop), there exists a tool to model and execute reference nets with seamless Java integration. So, reference nets can be used to design executable multi-agent systems w...
متن کاملSoccer Goalkeeper Task Modeling and Analysis by Petri Nets
In a robotic soccer team, goalkeeper is an important challenging role, which has different characteristics from the other teammates. This paper proposes a new learning-based behavior model for a soccer goalkeeper robot by using Petri nets. The model focuses on modeling and analyzing, both qualitatively and quantitatively, for the goalkeeper role so that we have a model-based knowledge of the ta...
متن کاملA Tool for Automated Test Code Generation from High-Level Petri Nets
Automated software testing has gained much attention because it is expected to improve testing productivity and reduce testing cost. Automated generation and execution of tests, however, are still very limited. This paper presents a tool, ISTA (Integration and System Test Automation), for automated test generation and execution by using high-level Petri nets as finite state test models. ISTA ha...
متن کاملA rule-based evaluation of ladder logic diagram and timed petri nets for programmable logic controllers
This paper describes an evaluation through a case study by measuring a rule-based approach, which proposed for ladder logic diagrams and Petri nets. In the beginning, programmable logic controllers were widely designed by ladder logic diagrams. When complexity and functionality of manufacturing systems increases, developing their software is becoming more difficult. Thus, Petri nets as a high l...
متن کاملUsing Interval Petri Nets and Timed Automata for Diagnosis of Discrete Event Systems (DES)
A discrete event system (DES) is a dynamic system that evolves in accordance with the abrupt occurrence, at possibly unknown irregular intervals, of physical events. Because of the special nature of these systems, different tools are currently used for their analysis, design and modeling. The main focus of this paper is the presentation of a new modeling approach of Discrete Event Systems. The ...
متن کامل